<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org
      http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<style>
    #container{
        width: 750px;
        height: 600px;
        margin-left: 40px;
    }
    #container2{
        width: 700px;
        border-radius: 50px;
        background-color: #e6e6e6;
    }
    #href{
        width: 700px;
        height: 500px;
    }
    #img{
        width: 700px;
        height: 500px;
        line-height: 500px;
        text-align: center;
        font-size: 20px;
        border: 1px #DFE4ED solid;
        border-radius: 50px;
        background-color: #e6e6e6;
    }
    #group{
        margin-left: 20px;
    }
    #creater{
        font-size: 20px;
        font-family: 'Microsoft YaHei UI', 'Microsoft YaHei', DengXian, SimSun, 'Segoe UI', Tahoma, Helvetica, sans-serif;
    }
    #auxiliary{
        font-size: 15px;
        font-family: "Arial Black";
    }
</style>
<body>
<th:block th:include="include :: footer"/>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <div th:each="callboard:${callboards}">
        <div id="container">
            <div id="container2">
                <div id="href">
                    <a th:href="${callboard.url}" target="_blank">
                        <img th:src="${callboard.photo}" id="img" data-callboardid="1" th:attr="data-callboardid=${callboard.id}" onclick="IncreaseViewCount(this)">
                    </a>
                </div>
                <div id="group">
                    <b>
                        <span th:text="${callboard.creater}" id="creater"></span>
                    </b>
                    <br>
                    <div class="container-fluid" id="auxiliary">
                <span th:text="${callboard.creatTime}">
                    </span>
                        <span>  浏览</span>
                        <span th:text="${callboard.viewCount}">
                </span>
                    </div>
                    <br>
                </div>
            </div>
        </div>
    </div>
<script th:inline="javascript">
    function IncreaseViewCount(obj) {
        var callboardid=$(obj).data('callboardid');
        $.ajax({
            url:  "/system/board/viewstatus",
            type: "POST",
            data:  {"callboardid":callboardid},
            dataType: 'json',
            success:function(data){
            }
        })
        location.reload();
    }
</script>
</body>
</html>